﻿using CaseManagerLibrary.Socket;
using PSDLib.Protocols;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace PSDClientService.Protocols
{
    public class RequestPSDDownloadingFilesProcessor : ClientMessageProcessor
    {
        public override void Run(ClientServiceContext context, TcpClientState state)
        {
            string managerIP = (state.RemoteEndPoint as IPEndPoint).Address.ToString();
            int managerPort = (Message as RequestPSDDownloadingFilesMessage).ManagerPort;

            context.DownloadContext.ResponseDownloadingFiles(new IPEndPoint(IPAddress.Parse(managerIP), managerPort));
        }
    }
}
